; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--list --split_sections --debug -c --asm --interleave -o..\out\stm32f10x_rtc.o --asm_dir=.\Lst\ --list_dir=.\Lst\ --depend=..\out\stm32f10x_rtc.d --cpu=Cortex-M3 --apcs=interwork -O0 --diag_suppress=9931 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -D__MICROLIB -D__UVISION_VERSION=525 -D_RTE_ -DSTM32F10X_HD -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\out\stm32f10x_rtc.crf ..\Libraries\src\stm32f10x_rtc.c]
                          THUMB

                          AREA ||i.RTC_ClearFlag||, CODE, READONLY, ALIGN=2

                  RTC_ClearFlag PROC
;;;272      */
;;;273    void RTC_ClearFlag(uint16_t RTC_FLAG)
000000  4902              LDR      r1,|L1.12|
;;;274    {
;;;275      /* Check the parameters */
;;;276      assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
;;;277        
;;;278      /* Clear the corresponding RTC flag */
;;;279      RTC->CRL &= (uint16_t)~RTC_FLAG;
000002  8809              LDRH     r1,[r1,#0]
000004  4381              BICS     r1,r1,r0
000006  4a01              LDR      r2,|L1.12|
000008  8011              STRH     r1,[r2,#0]
;;;280    }
00000a  4770              BX       lr
;;;281    
                          ENDP

                  |L1.12|
                          DCD      0x40002804

                          AREA ||i.RTC_ClearITPendingBit||, CODE, READONLY, ALIGN=2

                  RTC_ClearITPendingBit PROC
;;;317      */
;;;318    void RTC_ClearITPendingBit(uint16_t RTC_IT)
000000  4902              LDR      r1,|L2.12|
;;;319    {
;;;320      /* Check the parameters */
;;;321      assert_param(IS_RTC_IT(RTC_IT));  
;;;322      
;;;323      /* Clear the corresponding RTC pending bit */
;;;324      RTC->CRL &= (uint16_t)~RTC_IT;
000002  8809              LDRH     r1,[r1,#0]
000004  4381              BICS     r1,r1,r0
000006  4a01              LDR      r2,|L2.12|
000008  8011              STRH     r1,[r2,#0]
;;;325    }
00000a  4770              BX       lr
;;;326    
                          ENDP

                  |L2.12|
                          DCD      0x40002804

                          AREA ||i.RTC_EnterConfigMode||, CODE, READONLY, ALIGN=2

                  RTC_EnterConfigMode PROC
;;;110      */
;;;111    void RTC_EnterConfigMode(void)
000000  4803              LDR      r0,|L3.16|
;;;112    {
;;;113      /* Set the CNF flag to enter in the Configuration Mode */
;;;114      RTC->CRL |= RTC_CRL_CNF;
000002  8800              LDRH     r0,[r0,#0]
000004  f0400010          ORR      r0,r0,#0x10
000008  4901              LDR      r1,|L3.16|
00000a  8008              STRH     r0,[r1,#0]
;;;115    }
00000c  4770              BX       lr
;;;116    
                          ENDP

00000e  0000              DCW      0x0000
                  |L3.16|
                          DCD      0x40002804

                          AREA ||i.RTC_ExitConfigMode||, CODE, READONLY, ALIGN=2

                  RTC_ExitConfigMode PROC
;;;121      */
;;;122    void RTC_ExitConfigMode(void)
000000  4803              LDR      r0,|L4.16|
;;;123    {
;;;124      /* Reset the CNF flag to exit from the Configuration Mode */
;;;125      RTC->CRL &= (uint16_t)~((uint16_t)RTC_CRL_CNF); 
000002  8800              LDRH     r0,[r0,#0]
000004  f64f71ef          MOV      r1,#0xffef
000008  4008              ANDS     r0,r0,r1
00000a  4901              LDR      r1,|L4.16|
00000c  8008              STRH     r0,[r1,#0]
;;;126    }
00000e  4770              BX       lr
;;;127    
                          ENDP

                  |L4.16|
                          DCD      0x40002804

                          AREA ||i.RTC_GetCounter||, CODE, READONLY, ALIGN=2

                  RTC_GetCounter PROC
;;;132      */
;;;133    uint32_t RTC_GetCounter(void)
000000  2100              MOVS     r1,#0
;;;134    {
;;;135      uint16_t tmp = 0;
;;;136      tmp = RTC->CNTL;
000002  4803              LDR      r0,|L5.16|
000004  8801              LDRH     r1,[r0,#0]
;;;137      return (((uint32_t)RTC->CNTH << 16 ) | tmp) ;
000006  1f00              SUBS     r0,r0,#4
000008  8800              LDRH     r0,[r0,#0]
00000a  ea414000          ORR      r0,r1,r0,LSL #16
;;;138    }
00000e  4770              BX       lr
;;;139    
                          ENDP

                  |L5.16|
                          DCD      0x4000281c

                          AREA ||i.RTC_GetDivider||, CODE, READONLY, ALIGN=2

                  RTC_GetDivider PROC
;;;192      */
;;;193    uint32_t RTC_GetDivider(void)
000000  2000              MOVS     r0,#0
;;;194    {
;;;195      uint32_t tmp = 0x00;
;;;196      tmp = ((uint32_t)RTC->DIVH & (uint32_t)0x000F) << 16;
000002  4904              LDR      r1,|L6.20|
000004  8809              LDRH     r1,[r1,#0]
000006  0709              LSLS     r1,r1,#28
000008  0b08              LSRS     r0,r1,#12
;;;197      tmp |= RTC->DIVL;
00000a  4902              LDR      r1,|L6.20|
00000c  1d09              ADDS     r1,r1,#4
00000e  8809              LDRH     r1,[r1,#0]
000010  4308              ORRS     r0,r0,r1
;;;198      return tmp;
;;;199    }
000012  4770              BX       lr
;;;200    
                          ENDP

                  |L6.20|
                          DCD      0x40002810

                          AREA ||i.RTC_GetFlagStatus||, CODE, READONLY, ALIGN=2

                  RTC_GetFlagStatus PROC
;;;243      */
;;;244    FlagStatus RTC_GetFlagStatus(uint16_t RTC_FLAG)
000000  4601              MOV      r1,r0
;;;245    {
;;;246      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;247      
;;;248      /* Check the parameters */
;;;249      assert_param(IS_RTC_GET_FLAG(RTC_FLAG)); 
;;;250      
;;;251      if ((RTC->CRL & RTC_FLAG) != (uint16_t)RESET)
000004  4a03              LDR      r2,|L7.20|
000006  8812              LDRH     r2,[r2,#0]
000008  400a              ANDS     r2,r2,r1
00000a  b10a              CBZ      r2,|L7.16|
;;;252      {
;;;253        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L7.18|
                  |L7.16|
;;;254      }
;;;255      else
;;;256      {
;;;257        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L7.18|
;;;258      }
;;;259      return bitstatus;
;;;260    }
000012  4770              BX       lr
;;;261    
                          ENDP

                  |L7.20|
                          DCD      0x40002804

                          AREA ||i.RTC_GetITStatus||, CODE, READONLY, ALIGN=2

                  RTC_GetITStatus PROC
;;;290      */
;;;291    ITStatus RTC_GetITStatus(uint16_t RTC_IT)
000000  4601              MOV      r1,r0
;;;292    {
;;;293      ITStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;294      /* Check the parameters */
;;;295      assert_param(IS_RTC_GET_IT(RTC_IT)); 
;;;296      
;;;297      bitstatus = (ITStatus)(RTC->CRL & RTC_IT);
000004  4a06              LDR      r2,|L8.32|
000006  8812              LDRH     r2,[r2,#0]
000008  400a              ANDS     r2,r2,r1
00000a  b2d0              UXTB     r0,r2
;;;298      if (((RTC->CRH & RTC_IT) != (uint16_t)RESET) && (bitstatus != (uint16_t)RESET))
00000c  4a04              LDR      r2,|L8.32|
00000e  1f12              SUBS     r2,r2,#4
000010  8812              LDRH     r2,[r2,#0]
000012  400a              ANDS     r2,r2,r1
000014  b112              CBZ      r2,|L8.28|
000016  b108              CBZ      r0,|L8.28|
;;;299      {
;;;300        bitstatus = SET;
000018  2001              MOVS     r0,#1
00001a  e000              B        |L8.30|
                  |L8.28|
;;;301      }
;;;302      else
;;;303      {
;;;304        bitstatus = RESET;
00001c  2000              MOVS     r0,#0
                  |L8.30|
;;;305      }
;;;306      return bitstatus;
;;;307    }
00001e  4770              BX       lr
;;;308    
                          ENDP

                  |L8.32|
                          DCD      0x40002804

                          AREA ||i.RTC_ITConfig||, CODE, READONLY, ALIGN=2

                  RTC_ITConfig PROC
;;;89       */
;;;90     void RTC_ITConfig(uint16_t RTC_IT, FunctionalState NewState)
000000  b129              CBZ      r1,|L9.14|
;;;91     {
;;;92       /* Check the parameters */
;;;93       assert_param(IS_RTC_IT(RTC_IT));  
;;;94       assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;95       
;;;96       if (NewState != DISABLE)
;;;97       {
;;;98         RTC->CRH |= RTC_IT;
000002  4a06              LDR      r2,|L9.28|
000004  8812              LDRH     r2,[r2,#0]
000006  4302              ORRS     r2,r2,r0
000008  4b04              LDR      r3,|L9.28|
00000a  801a              STRH     r2,[r3,#0]
00000c  e004              B        |L9.24|
                  |L9.14|
;;;99       }
;;;100      else
;;;101      {
;;;102        RTC->CRH &= (uint16_t)~RTC_IT;
00000e  4a03              LDR      r2,|L9.28|
000010  8812              LDRH     r2,[r2,#0]
000012  4382              BICS     r2,r2,r0
000014  4b01              LDR      r3,|L9.28|
000016  801a              STRH     r2,[r3,#0]
                  |L9.24|
;;;103      }
;;;104    }
000018  4770              BX       lr
;;;105    
                          ENDP

00001a  0000              DCW      0x0000
                  |L9.28|
                          DCD      0x40002800

                          AREA ||i.RTC_SetAlarm||, CODE, READONLY, ALIGN=2

                  RTC_SetAlarm PROC
;;;177      */
;;;178    void RTC_SetAlarm(uint32_t AlarmValue)
000000  b500              PUSH     {lr}
;;;179    {  
000002  4602              MOV      r2,r0
;;;180      RTC_EnterConfigMode();
000004  f7fffffe          BL       RTC_EnterConfigMode
;;;181      /* Set the ALARM MSB word */
;;;182      RTC->ALRH = AlarmValue >> 16;
000008  0c10              LSRS     r0,r2,#16
00000a  4903              LDR      r1,|L10.24|
00000c  8008              STRH     r0,[r1,#0]
;;;183      /* Set the ALARM LSB word */
;;;184      RTC->ALRL = (AlarmValue & RTC_LSB_MASK);
00000e  1d09              ADDS     r1,r1,#4
000010  800a              STRH     r2,[r1,#0]
;;;185      RTC_ExitConfigMode();
000012  f7fffffe          BL       RTC_ExitConfigMode
;;;186    }
000016  bd00              POP      {pc}
;;;187    
                          ENDP

                  |L10.24|
                          DCD      0x40002820

                          AREA ||i.RTC_SetCounter||, CODE, READONLY, ALIGN=2

                  RTC_SetCounter PROC
;;;144      */
;;;145    void RTC_SetCounter(uint32_t CounterValue)
000000  b500              PUSH     {lr}
;;;146    { 
000002  4602              MOV      r2,r0
;;;147      RTC_EnterConfigMode();
000004  f7fffffe          BL       RTC_EnterConfigMode
;;;148      /* Set RTC COUNTER MSB word */
;;;149      RTC->CNTH = CounterValue >> 16;
000008  0c10              LSRS     r0,r2,#16
00000a  4903              LDR      r1,|L11.24|
00000c  8008              STRH     r0,[r1,#0]
;;;150      /* Set RTC COUNTER LSB word */
;;;151      RTC->CNTL = (CounterValue & RTC_LSB_MASK);
00000e  1d09              ADDS     r1,r1,#4
000010  800a              STRH     r2,[r1,#0]
;;;152      RTC_ExitConfigMode();
000012  f7fffffe          BL       RTC_ExitConfigMode
;;;153    }
000016  bd00              POP      {pc}
;;;154    
                          ENDP

                  |L11.24|
                          DCD      0x40002818

                          AREA ||i.RTC_SetPrescaler||, CODE, READONLY, ALIGN=2

                  RTC_SetPrescaler PROC
;;;159      */
;;;160    void RTC_SetPrescaler(uint32_t PrescalerValue)
000000  b500              PUSH     {lr}
;;;161    {
000002  4602              MOV      r2,r0
;;;162      /* Check the parameters */
;;;163      assert_param(IS_RTC_PRESCALER(PrescalerValue));
;;;164      
;;;165      RTC_EnterConfigMode();
000004  f7fffffe          BL       RTC_EnterConfigMode
;;;166      /* Set RTC PRESCALER MSB word */
;;;167      RTC->PRLH = (PrescalerValue & PRLH_MSB_MASK) >> 16;
000008  f3c24003          UBFX     r0,r2,#16,#4
00000c  4903              LDR      r1,|L12.28|
00000e  8008              STRH     r0,[r1,#0]
;;;168      /* Set RTC PRESCALER LSB word */
;;;169      RTC->PRLL = (PrescalerValue & RTC_LSB_MASK);
000010  1d09              ADDS     r1,r1,#4
000012  800a              STRH     r2,[r1,#0]
;;;170      RTC_ExitConfigMode();
000014  f7fffffe          BL       RTC_ExitConfigMode
;;;171    }
000018  bd00              POP      {pc}
;;;172    
                          ENDP

00001a  0000              DCW      0x0000
                  |L12.28|
                          DCD      0x40002808

                          AREA ||i.RTC_WaitForLastTask||, CODE, READONLY, ALIGN=2

                  RTC_WaitForLastTask PROC
;;;206      */
;;;207    void RTC_WaitForLastTask(void)
000000  bf00              NOP      
                  |L13.2|
;;;208    {
;;;209      /* Loop until RTOFF flag is set */
;;;210      while ((RTC->CRL & RTC_FLAG_RTOFF) == (uint16_t)RESET)
000002  4803              LDR      r0,|L13.16|
000004  8800              LDRH     r0,[r0,#0]
000006  f0000020          AND      r0,r0,#0x20
00000a  2800              CMP      r0,#0
00000c  d0f9              BEQ      |L13.2|
;;;211      {
;;;212      }
;;;213    }
00000e  4770              BX       lr
;;;214    
                          ENDP

                  |L13.16|
                          DCD      0x40002804

                          AREA ||i.RTC_WaitForSynchro||, CODE, READONLY, ALIGN=2

                  RTC_WaitForSynchro PROC
;;;222      */
;;;223    void RTC_WaitForSynchro(void)
000000  4807              LDR      r0,|L14.32|
;;;224    {
;;;225      /* Clear RSF flag */
;;;226      RTC->CRL &= (uint16_t)~RTC_FLAG_RSF;
000002  8800              LDRH     r0,[r0,#0]
000004  f64f71f7          MOV      r1,#0xfff7
000008  4008              ANDS     r0,r0,r1
00000a  4905              LDR      r1,|L14.32|
00000c  8008              STRH     r0,[r1,#0]
;;;227      /* Loop until RSF flag is set */
;;;228      while ((RTC->CRL & RTC_FLAG_RSF) == (uint16_t)RESET)
00000e  bf00              NOP      
                  |L14.16|
000010  4803              LDR      r0,|L14.32|
000012  8800              LDRH     r0,[r0,#0]
000014  f0000008          AND      r0,r0,#8
000018  2800              CMP      r0,#0
00001a  d0f9              BEQ      |L14.16|
;;;229      {
;;;230      }
;;;231    }
00001c  4770              BX       lr
;;;232    
                          ENDP

00001e  0000              DCW      0x0000
                  |L14.32|
                          DCD      0x40002804
